package com.ee.chat.common.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ee.chat.common.entity.Channel;
import com.ee.chat.common.entity.ChannelConfig;
import com.ee.chat.common.entity.ChannelShortUrl;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper接口
 * </p>
 *
 * @author AppiJ
 * @since 2020-04-21
 */
public interface ChannelShortUrlMapper extends BaseMapper<ChannelShortUrl> {

    /**
     * 查询对应落地页无短网址的渠道
     * @Author AppiJ
     * @Date 2020/4/21 14:52
     * @param
     * @return
     */
    List<Channel> queryNoShortUrlChannelByCid(@Param("cid") Integer cid);

    /**
     * 查询对应渠道无短网址的落地页
     * @Author AppiJ
     * @Date 2020/4/21 15:19
     * @param
     * @return
     */
    List<ChannelConfig> queryNoShortUrlChannelByPid(@Param("pid") Integer pid);

    /**
     * 根据落地页删除短网址
     * @Author AppiJ
     * @Date 2020/5/20 18:23
     * @param
     * @return
     */
    int deleteByCid(@Param("cid") Integer cid);
}